package com.neusoft.rental.controller;

import com.neusoft.rental.po.Information;
import com.neusoft.rental.service.InformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/InformationController")
public class InformationController {

    @Autowired
    private InformationService informationService;

    //查询所有的此用户的消息
    @RequestMapping("/queryinformation")
    public List<Information> queryinformation(String userid) {
        return informationService.queryinformation(userid);
    }

    //更新用户阅读状态
    @RequestMapping("/readInformation")
    public int readInformation(int id) {
        return informationService.readInformation(id);
    }
}
